package com.skyworth.ui.newrecycleview;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

public class SpaceItemDecoration extends RecyclerView.ItemDecoration
{
    private int vSpace = 22, hSpace = 22;

    public SpaceItemDecoration(int hSpace, int vSpace)
    {
        this.hSpace = hSpace;
        this.vSpace = vSpace;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
    {
        outRect.left = hSpace;
        outRect.top = vSpace;
    }
}